<?php
    error_reporting(0);
    define('__ROOT__', dirname(dirname(__FILE__)));
    require_once(__ROOT__.'\config\config.php'); 
    require_once (__ROOT__.'\model\db.php');
    require_once (__ROOT__.'\model\user.php');
    if(isset($_SESSION['email']))
        echo("<script>location.href = '".HOST."index.php';</script>");
    $user = new User();
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>Home | E-Shopper</title>
    <link href="../css/bootstrap.min.css" rel="stylesheet">
    <link href="../css/font-awesome.min.css" rel="stylesheet">
    <link href="../css/main.css" rel="stylesheet">
    <!--[if lt IE 9]>
    <script src="js/html5shiv.js"></script>
    <script src="js/respond.min.js"></script>
    <![endif]-->       
    <link rel="shortcut icon" href="images/ico/favicon.ico">
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="images/ico/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="images/ico/apple-touch-icon-114-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="images/ico/apple-touch-icon-72-precomposed.png">
    <link rel="apple-touch-icon-precomposed" href="images/ico/apple-touch-icon-57-precomposed.png">
</head><!--/head-->

<body>
	<header id="header"><!--header-->
            <?php
                if(empty($_SESSION))
                    session_start ();
                if(isset($_SESSION['email']))   
                    require_once (__ROOT__.'/view/header_login_succeed.php');
                else{
                    require_once (__ROOT__.'/view/header_login.php');
                }
            ?>
	</header><!--/header-->
        <section id="form"><!--form-->
		<div class="container">
			<div class="row">
				<div class="col-sm-4 col-sm-offset-1">
					<div class="login-form"><!--login form-->
						<h2>Login to your account</h2>
                                                <form action="view_signup-login.php" method="post">
                                                        <input type="email" placeholder="Email Address" name="loemail"/>
                                                        <input type="password" placeholder="Password" name="lopass"/>
                                                        <?php echo 'eee' ?>
                                                        <button type="submit" class="btn btn-default" name="submit">Login</button>
						</form>
					</div><!--/login form-->
				</div>
				<div class="col-sm-1">
					<h2 class="hihi">OR</h2>
				</div>
				<div class="col-sm-4">
					<div class="signup-form"><!--sign up form-->
						<h2>New User Signup!</h2>
                                                <form action="#" method="post">
							<input type="text" placeholder="Name" name="siname"/>
                                                        <input type="email" placeholder="Email Address" name="siemail"/>
							<input type="password" placeholder="Password" name="sipass"/>
                                                        <input type="password" placeholder="Re-Password" name="resipass"/>
                                                        <button type="submit" class="btn btn-default" name="submit2">Signup</button>
						</form>
					</div><!--/sign up form-->
				</div>
			</div>
		</div>
	</section><!--/form-->
	
	
	<?php  require_once (__ROOT__.'\view\footer.php'); ?>
	

  
    <script src="../js/jquery.js"></script>
	<script src="../js/bootstrap.min.js"></script>
	<script src="../js/jquery.scrollUp.min.js"></script>
    <script src="../js/jquery.prettyPhoto.js"></script>
    <script src="../js/main.js"></script>
</body>
</html>
<?php
   require_once (__ROOT__.'\controller\signup-login_controller.php');
?>